<%@ page language="java" contentType="text/html; charset=utf8"
	pageEncoding="utf8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf8">
	<link type="text/css" href="/CommandsOnline/resources/css/jquery-ui.css" rel="stylesheet" />
	<link type="text/css" href="/CommandsOnline/resources/css/main.css" rel="stylesheet" />
	<script type="text/javascript" src="/CommandsOnline/resources/jquery.min.js"></script>
	<script type="text/javascript" src="/CommandsOnline/resources/jquery-ui.min.js"></script>
<script type="text/javascript">
/* ---------------------------------------------- */
function init() {
	//  $("#tbUsersList").styleTable();

}

$(document).ready(init);
</script>	
<title>Insert title here</title>
</head>
<body>
Advertising Registry List
<form:form method="post" commandName="advertisingRegistry">
	<table>
		<tr>
			<td><form:label path="id"><spring:message code="label.registeredUserFirstLastName" /></form:label></td>
			<td><form:input path="inventarNr" /></td>
		</tr>
		<tr>
			<td colspan="2"><input type="submit"
				value="<spring:message code="label.addcontact"/>" /></td>
		</tr>
	</table>
</form:form>

<c:if test="${!empty advertisingRegistryList}">
	<table id="tbAdvertisingRegistryList" class="userListTable">
		<tr>
			<th>#</th>
			<th><spring:message code="label.inventarNr" /></th>
			<th><spring:message code="label.supportTypeName" /></th>
			<th><spring:message code="label.regionName" /></th>
			<th><spring:message code="label.localityName" /></th>
			<th><spring:message code="label.adress" /></th>
			<th><spring:message code="label.status" /></th>
			<th>&nbsp;</th>
		</tr> 
		<c:forEach items="${advertisingRegistryList}" var="advertisingRegistry">
			<tr onMouseOver="this.bgColor = '#EDB2CA'"
    			onMouseOut ="this.bgColor = '#FFFFFF'"
    			bgcolor="#FFFFFF" >
    			
				<td>${advertisingRegistry.id}</td>
				<td>${advertisingRegistry.inventarNr}</td>
				<td>${advertisingRegistry.supportTypeName}</td>
				<td>${advertisingRegistry.regionName}</td>
				<td>${advertisingRegistry.localityName}</td>
				<td>${advertisingRegistry.adress}</td>
				<td>${advertisingRegistry.status}</td>
				<td><a href="delete/${user.id}">
<%-- 				<spring:message code="label.deactivate" /> --%>
				<img alt="X" width="24" height="24" src="/CommandsOnline/resources/images/delete.png"/>
				</a></td>
			</tr>
		</c:forEach>
	</table>
</c:if>

</body>
</html>